<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" import="pojo.Student"%>
<html>
<head>
<title>创建学生对象，并设置相应属性</title>
</head>
<body>
	分别用"代码法"和"标签法"创建JavaBean对象stu1,stu2,并设置相应属性
	<%
		Student stu1 =new Student();
		stu1.setNum("1656");
		stu1.setName("name");
		stu1.setGender("男");
		stu1.setMajor("计算机科学与技术");
		session.setAttribute("stu1", stu1);
	%>
	<jsp:useBean id="stu2" scope="session" class="pojo.Student" />
	<jsp:setProperty name="stu2" property="num" value="1516" />
	<jsp:setProperty name="stu2" property="name" value="name" />
	<jsp:setProperty name="stu2" property="gender" value="男" />
	<jsp:setProperty name="stu2" property="major" value="物联网工程" />
</body>
</html>
